{extend name="public:base" /}
{block name="content"}

<input type="hidden" name="id" id="id" value="{$list.id? $list.id : ''}">
    <div style="width: 500px;height:auto; padding-top: 20px">
        <div id="from" class="layui-form"  >
            <div class="layui-form-item">
                <label class="layui-form-label">提现倍数</label>
                <div class="layui-input-block">
                    <input type="text" name="double" value="{$list.double? $list.double : ''}" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" id="submitSet" lay-filter="formDemo">确认设置</button>
                </div>
            </div>
        </div>
    </div>
{/block}

{block name="javascript"}
<script type="text/javascript">
    $("#submitSet").click(function(){
            var double = $("input[name='double']").val();
            var id = $("#id").val();
            if(double == ''){
                alert("请输入数字");
                return false;
            }

            $.ajax({
                type: 'POST',
                url: '{:url("Cash/setting")}',
                dataType: 'json',
                data: {
                    id: id,
                    double: double
                },
                success: function (data) {
                    if( data.result == 0 ){
                        alert(data.msg);
                    }else{
                        alert(data.msg);
                    }
                }
            });
    })
</script>
{/block}